IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[MachineDriveVolume]') AND type in (N'U'))
BEGIN
     DROP TABLE [dbo].[MachineDriveVolume]
END
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[MachineDriveVolume](
     [MachineId]               [int]          NOT NULL,
     [MachineDriveVolumeId]    [int]          NOT NULL,
     [StartDt]                 [datetime]     NOT NULL,
     [EndDt]                   [datetime]     NOT NULL,
     [CurrentRecordFlag]       [tinyint]      NOT NULL,
     [PackageExecutionId]      [bigint]       NOT NULL,
     [VolumeDeletedFlag]       [tinyint]      NOT NULL,
     [VolumeDeviceId]          [varchar](128) NOT NULL,
     [VolumeMountPoint]        [varchar](255)     NULL,
     [VolumeBlockSize]         [int]              NULL,
     [VolumeCapacity]          [bigint]           NULL,
     [VolumeCompressedFlag]    [tinyint]          NULL,
     [VolumeDriveTypeDesc]     [varchar](30)  NOT NULL,
     [VolumeFileSystemType]    [varchar](6)   NOT NULL,
     [VolumeLabel]             [varchar](32)  NOT NULL,
     [VolumeName]              [varchar](128) NOT NULL,
     [VolumeSerialNumber]      [bigint]       NOT NULL,
     [ClusterSharedVolumeFlag] [tinyint]      NOT NULL,
     CONSTRAINT [PK_MachineDriveVolume] PRIMARY KEY CLUSTERED ( [MachineId] ASC, [MachineDriveVolumeId] ASC, [StartDt] ASC )
) ON [PRIMARY]
GO

SET ANSI_PADDING OFF
GO
